observations
Class Patient

java.lang.Object
  extended byobservations.DomainObject
      extended byobservations.Patient
All Implemented Interfaces:
DomainInterface

public class Patient
extends DomainObject

Patient Represents a patient with all associated data and grants retrieval of phenomena, measurements and observations.

Version:
2004-09-10
Author:
Sascha Hemminger

Constructor Summary
Patient(java.lang.String name)
          Default constructor constructs a new patient object with name.
 
Method Summary
static Patient get(java.lang.String name)
          Use this one to search a patient by name.
 Quantity getLatestAmountOf(PhenomenonType value)
          Use this to search the latest amount observed and saved of a particular type.
 Observation getLatestObservation(Phenomenon value)
          Use this to search the latest observation made on a particular phenomenon.
 Observation getLatestObservation(PhenomenonType value)
          Gives the latest observation made on a particular type.
 Observation getObservations()
          Gives the latest observations made.
 java.util.Enumeration getObservationsEnumeration()
          Returns all present observations.
 java.util.Enumeration getObservationsOf(Phenomenon value)
          Returns all observations made on a particular phenomenon.
 java.util.Enumeration getObservationsOf(PhenomenonType value)
          Returns all observations made of a particular phenomenon.
 Phenomenon getPhenomenonOf(PhenomenonType phenomenonType)
          Gives the phenomenon for a particular type.
 Phenomenon getPhenomenonOf(java.lang.String name)
          Gives the phenomenon for a type.
 java.lang.Boolean isPresent(Phenomenon value)
          If a phenomenon is present its the latest observed.
 void observationsAdd(Observation newObs)
          Adds a new observation.
 Patient persist()
          Registers a patient, means saves patient to memory.
 void setObservations(Observation observations)
          Sets the latest observation.
 
Methods inherited from class observations.DomainObject
getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Patient

public Patient(java.lang.String name)
Default constructor constructs a new patient object with name.

Parameters:
name - the patient's name 'John Doe'
See Also:
DomainObject.DomainObject(String)
Method Detail

get

public static Patient get(java.lang.String name)
Use this one to search a patient by name.

Parameters:
name - name of patient to search
Returns:
Patient if found else null

getLatestAmountOf

public Quantity getLatestAmountOf(PhenomenonType value)
Use this to search the latest amount observed and saved of a particular type.

Parameters:
value - PhenomenonType to get the latest amount for
Returns:
latest amount for PhenomenonType

getLatestObservation

public Observation getLatestObservation(Phenomenon value)
Use this to search the latest observation made on a particular phenomenon.

Parameters:
value - Phenomenon to get the latest Obs for
Returns:
latest Obs for Phenomenon

getLatestObservation

public Observation getLatestObservation(PhenomenonType value)
Gives the latest observation made on a particular type.

Parameters:
value - PhenomenonType to get the latest Obs for
Returns:
latest Obs of PhenomenonType

getObservations

public Observation getObservations()
Gives the latest observations made.

Returns:
latest observation
See Also:
setObservations(Observation)

getObservationsEnumeration

public java.util.Enumeration getObservationsEnumeration()
Returns all present observations.

Returns:
all Observations

getObservationsOf

public java.util.Enumeration getObservationsOf(Phenomenon value)
Returns all observations made on a particular phenomenon.

Parameters:
value - Phenomenon to get all Observations for
Returns:
an enumeration of all Obs for Phenomenon

getObservationsOf

public java.util.Enumeration getObservationsOf(PhenomenonType value)
Returns all observations made of a particular phenomenon.

Parameters:
value - PhenomenonType to get all Observations for
Returns:
an enumeration of all Obs for PhenomenonType

getPhenomenonOf

public Phenomenon getPhenomenonOf(PhenomenonType phenomenonType)
Gives the phenomenon for a particular type.

Parameters:
phenomenonType - which PhenomenonType to search
Returns:
particular Phenomenon for PhenomenonType for this Patient

getPhenomenonOf

public Phenomenon getPhenomenonOf(java.lang.String name)
Gives the phenomenon for a type. The type is searched by name.

Parameters:
name - name of the type of Phenomenon to search
Returns:
particular Phenomenon for this Patient

isPresent

public java.lang.Boolean isPresent(Phenomenon value)
If a phenomenon is present its the latest observed.

Parameters:
value - Phenomenon to check whether it is present
Returns:
true if present

observationsAdd

public void observationsAdd(Observation newObs)
Adds a new observation.

Parameters:
newObs - add a new observed Observation to this Patient's Observations

persist

public Patient persist()
Registers a patient, means saves patient to memory.

Returns:
the saved patient

setObservations

public void setObservations(Observation observations)
Sets the latest observation.

Parameters:
observations - latest observation made
See Also:
getObservations()